//
//  XS_Activity.swift
//  Alamofire
//
//  Created by 韩云智 on 2020/7/14.
//
//  window层的Loading弹框（阻止页面操作）

import Toast_Swift

public func showActivity(_ isShow: Bool = false, point: CGPoint? = nil) {
    let window = xsWindow()
    window?.isUserInteractionEnabled = false
    if isShow {
        if let point = point {
            window?.makeToastActivity(point)
        } else {
            window?.makeToastActivity(.center)
        }
        window?.alpha = 0.65
    }
}
public func hideActivity() {
    let window = xsWindow()
    window?.isUserInteractionEnabled = true
    window?.hideToastActivity()
    window?.alpha = 1
}
